#include <vector>
#include <list>
#include <set>
#include <map>
#include <iostream>

using namespace std;

int main()
{
	vector<int> v1 = { 1,2,3 };
	for (vector<int>::const_iterator it = v1.begin(); it != v1.end(); ++it)
	{
		if (*it != v1.back())
		{
			cout << *it << endl;
		}
	}

	auto it1 = v1.begin();
	auto it2 = next(it1);
	auto it3 = prev(it2);
	cout << *it1 << "," << *it2 << "," << *it3 << endl;

	vector<int> v2 = { 1,2,3 };
	if (v1.begin()._Ptr == v2.begin()._Ptr && v1.begin() == v2.begin())
		cout << "v1.begin() == v2.begin())" << endl;
	else
		cout << "v1.begin() != v2.begin())" << endl;

	cout << typeid(vector<int>::iterator).name() << endl;
	cout << typeid(list<int>::iterator).name() << endl;
	cout << typeid(set<int>::iterator).name() << endl;
	cout << typeid(map<int, int>::iterator).name() << endl;

	return 0;
}